package com.hmall.cart.config;

import org.springframework.cloud.client.loadbalancer.LoadBalanced;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.client.RestTemplate;

/**
 *  远程调用配置类
 * @author Ang
 */
@Configuration
public class RemoteCallConfig {

    /**
     *  将RestTemplate交给容器管理
     */
    @LoadBalanced
    @Bean
    public RestTemplate restTemplate() {

        return new RestTemplate();
    }

}
